<template>
  <!--修饰符-->
  <h1> 修饰符，多个model</h1>
  <el-input v-model="name" placeholder=""></el-input>
  <el-input v-model="age" placeholder=""></el-input>
</template>

<script setup lang="ts" generic="T">
  import { reactive } from 'vue'
  const [name, nameModifiers] = defineModel<T, 'capitalize'>('name')
  const [age, ageModifiers] = defineModel<number, 'add'>('age', {
    required: true, // 必填
    get (value:string) {
      return value + 100
    },
  })

  
  // 修饰符的结构
  console.log('nameModifiers:::', nameModifiers)
  console.log('ageModifiers:::', ageModifiers)

</script>